package com.tcm.smarthealth.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Schema(name = "ImageRecordResponse", description = "影像分析结果")
public class ImageRecordResponse {

    @Schema(description = "记录 ID", example = "654c0a3f0d1b...")
    private String id;

    @Schema(description = "文件名称", example = "tongue-20251107.png")
    private String filename;

    @Schema(description = "内容类型", example = "image/png")
    private String contentType;

    @Schema(description = "文件大小（字节）", example = "102400")
    private long fileSize;

    @Schema(description = "分析类型", example = "TONGUE_DIAGNOSIS")
    private String analysisType;

    @Schema(description = "诊断结论")
    private String diagnosis;

    @Schema(description = "调理建议")
    private List<String> suggestions;

    @Schema(description = "置信度", example = "0.91")
    private BigDecimal confidence;

    @Schema(description = "预览地址", example = "/v1/images/654c0a3f0d1b/preview")
    private String previewUrl;

    @Schema(description = "创建时间", example = "2025-11-07 21:20:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getFilename() {
        return filename;
    }

    public void setFilename(String filename) {
        this.filename = filename;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public long getFileSize() {
        return fileSize;
    }

    public void setFileSize(long fileSize) {
        this.fileSize = fileSize;
    }

    public String getAnalysisType() {
        return analysisType;
    }

    public void setAnalysisType(String analysisType) {
        this.analysisType = analysisType;
    }

    public String getDiagnosis() {
        return diagnosis;
    }

    public void setDiagnosis(String diagnosis) {
        this.diagnosis = diagnosis;
    }

    public List<String> getSuggestions() {
        return suggestions;
    }

    public void setSuggestions(List<String> suggestions) {
        this.suggestions = suggestions;
    }

    public BigDecimal getConfidence() {
        return confidence;
    }

    public void setConfidence(BigDecimal confidence) {
        this.confidence = confidence;
    }

    public String getPreviewUrl() {
        return previewUrl;
    }

    public void setPreviewUrl(String previewUrl) {
        this.previewUrl = previewUrl;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
}

